﻿using System.ComponentModel.DataAnnotations;

namespace MES.Server.API.Dto.Material_Management.OutPut
{
    public class GetBomOutPut
    {
        public long Id { get; set; }
        /// <summary>
        /// Bom编码
        /// </summary>
        public string BomCode { get; set; }
        /// <summary>
        /// Bom名称
        /// </summary>
        public string BomName { get; set; }
        /// <summary>
        /// 所属物料群组外键
        /// </summary>
        public long MaterialGroupId { get; set; }
        /// <summary>
        /// Bom版本
        /// </summary>
        public string BomVersion { get; set; }
        /// <summary>
        /// 工序外键
        /// </summary>
        public long ProcessManagementId { get; set; }
        ///// <summary>
        ///// 工序名称
        ///// </summary>
        //[Required]
        //[MaxLength(100)]
        //public string ProcessName { get; set; }
        /// <summary>
        /// 用量
        /// </summary>
        public int UseNum { get; set; }
        /// <summary>
        /// Bom描述
        /// </summary>
        public string BomDesc { get; set; }
        /// <summary>
        /// 父级BOM的ID，用于构建树形结构
        /// </summary>
        public long? ParentId { get; set; }
        /// <summary>
        /// BOM层级，根节点为1
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 是否为叶子节点
        /// </summary>
        public bool IsLeaf { get; set; }
        /// <summary>
        /// 子级BOM列表
        /// </summary>
        public List<GetBomOutPut> Children { get; set; } = new List<GetBomOutPut>();
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreaterPeople { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }
}
